<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2025/7/23 星期三
  Time: 22:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>

<head>
    <base href="${pageContext.request.contextPath}/" />
    <title>襄阳蓝芯智能化办公系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="static/bootstrap-3.3.5/css/bootstrap.css" rel="stylesheet">
    <style>
        /*定义类名为.thead-blue的样式*/
        .thead-blue {
            color: #fff;
            font-weight: bold;
            background-color: #337ab7;
        }
    </style>
</head>
<body>

<div class="panel panel-primary">
    <table class="table table-bordered table-hover">
        <thead>
        <tr class="thead-blue">
            <td colspan="6">部门详情</td>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class="col-md-1"><label>部门名称</label></td>
            <td class="col-md-3">${department.deptName}</td>
            <td class="col-md-1"><label>上级部门</label></td>
            <td class="col-md-3">${department.parentName}</td>
            <td class="col-md-1"><label>部门经理</label></td>
            <td class="col-md-3">${department.managerName}</td>
        </tr>

        <tr>
            <td><label>部门电话</label></td>
            <td>${department.phone}</td>
            <td><label>部门传真</label></td>
            <td>${department.fax}</td>
            <td><label>部门邮箱</label></td>
            <td>${department.email}</td>
        </tr>

        <tr>
            <td><label>部门邮编</label></td>
            <td>${department.zipcode}</td>
            <td><label>状态</label></td>
            <td>${department.status=='Y' ? '可用':'禁用'}</td>
            <td><label>部门地址</label></td>
            <td>${department.address}</td>
        </tr>
        <tr>
            <td><label>部门介绍</label></td>
            <td colspan="5">${department.description}</td>
        </tr>
        <tr>
            <td><label>部门职位</label></td>
            <td colspan="5">

                <c:forEach items="${jobs}" var="job">
                    <span class="label label-success">${job.jobName}</span>&nbsp;
                </c:forEach>

            </td>
        </tr>
        <tr>
            <td colspan="6" align="center">
                <a type="button" href="javascript:history.back()" class="btn btn-info">返回</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>






<script type="text/javascript">
    $(document).ajaxError(function(event,xhr) {
        if(xhr.status=="403"){//没有权限
            document.location.href = xhr.getResponseHeader("url");
        }else if(xhr.status!="200"){
            //alert("服务器错误!");
            console.log("服务器错误!");
        }
    });
</script>
</body>
</html>
